package com.mnsq.common.tools.tool;

import com.vwkit.common.helper.encrypt.MD5;

import java.util.UUID;

/**
 * @author Zj
 * @date 2018/7/8 0008
 */
public class UUIDUtils {

    public static String getToken() {
        return MD5.get32(SnowFlakeIdGenerator.getInstance().nextId() + "");
    }

    public static String getUnique() {
        return UUID.randomUUID().toString().toLowerCase().replaceAll("-", "").substring(0, 20);
    }

    public static String getUserName() {
        return "用户" + UUID.randomUUID().toString().toLowerCase().substring(0, 8);
    }
}
